home *** CD-ROM | disk | FTP | other *** search
- Path: interramp.com!usenet
- From: Barnett@interramp.com (Barnett E. Kurtz)
- Newsgroups: comp.lang.c++
- Subject: Re: DLL and .ini-file
- Date: Thu, 08 Feb 1996 17:41:09 GMT
- Organization: EntroData, Inc.
- Message-ID: <4fd9p1$afg@usenet4.interramp.com>
- References: <3119F649.4EE0@danadata.dk>
- Reply-To: Barnett@interramp.com
- NNTP-Posting-Host: ip24.philadelphia.pa.interramp.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- Kristian,
-
- It has been awhile, but as I recall you can simply use the global SDK
- GetModuleFileName() function to retrieve the \path\name of the
- executing (calling) program. If you are using the _private_ profile
- functions to read the client's *.ini you should be able to resolve
- it's location this way. Of course this assumes that the client's *.ini
- file follows the usual naming convention, i.e. for client.exe there
- should be a file named client.ini residing in the same directory as
- client.exe. Recall, from the Windows point of view, your dll is an
- integral part of the client application. For example, when your dll
- calls a function it makes use of the calling application's stack just
- as if your sever dll function had been statically linked.
-
- Standard Speech: A better place for questions that do not relate
- directly to c++ 'The Language' should be posted elsewhere. In this
- case, comp.os.ms-windows.programmer.tools.mfc would be more
- appropriate.
-
- dantek <dantek@danadata.dk> wrote:
-
- >Hi !
- >I have written a simple objectserver and placed it in a DLL. I use
- >MSVC++ v 1.5. How do I associate a .ini file to the DLL. I do not use
- >CWinApp from the DLL.
-
- >Yours Sincerely
- >Kristian Lippert
-
- -
- barnett@interramp.com
- -
-
-